﻿
namespace Sex
{
    public partial class Sex : System.Web.UI.Page
    {
        public class ListFileGroups : MyList
        {
            public ListFileGroups(State MyState)
                : base(MyState, "File Groups", "File Group", new string[] { "Extension", "Start mode", "Show CODE", "Show DOWNLOAD", "Show EMBED", "Show EXIF", "Show FRAME", "Show HEX", "Show INLINE", "Show PERMISSIONS", "Show SPECIAL" })
            {
                for (int i = 0; i < FileGroups.list.Count; i++)
                {
                    string Extensions = "";
                    for (int j = 0; j < FileTypes.list.Count; j++)
                    {
                        if (FileTypes.list[j].Type == FileGroups.list[i].FileType)
                            Extensions += (Extensions == "" ? "" : ", ") + FileTypes.list[j].Extension;
                    }
                    Add(FileGroups.list[i].FileType.ToString(), new string[] 
                    { 
                        // FileGroups.list[i].Description,
                        Extensions,
                        FileGroups.list[i].ShowFirst.ToString(), 
                        FileGroups.list[i].ShowCode.ToString(),
                        FileGroups.list[i].ShowDownload.ToString(),
                        FileGroups.list[i].ShowEmbedded.ToString(),
                        FileGroups.list[i].ShowExif.ToString(),
                        FileGroups.list[i].ShowFrame.ToString(),
                        FileGroups.list[i].ShowHex.ToString(),
                        FileGroups.list[i].ShowInline.ToString(),
                        FileGroups.list[i].ShowPermissions.ToString(),
                        FileGroups.list[i].ShowSpecial.ToString()
                    });
                }
            }
        }
    }
}